Co-Slicing for Program Comprehension and Reuse

نویسنده

  • Ran Ettinger
چکیده

When trying to understand certain behaviors of a given program, a programmer’s job can be facilitated by the use of a slicing tool, which helps focusing attention on the relevant subprogram. After, or even instead of reading a selected program slice, a programmer might be interested in studying its complement, i.e. the rest of the program. But what is that complement? Simply taking all statements outside the slice will not do, as some of the slice’s statements might be relevant too. Instead, one might ask which statements of a given slice can be removed from the original program, assuming the sliced results are already available. The removal of such redundant statements would yield a slice’s complement. This paper introduces the concept of a complement-slice, or simply co-slice, and demonstrates its use in both program comprehension and reuse. Moreover, the paper presents a provably correct co-slicing algorithm for a simple programming language, and outlines a corresponding solution for the general case.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Forward Slicing of Multi-paradigm Declarative Programs Based on Partial Evaluation

Program slicing has been mainly studied in the context of imperative languages, where it has been applied to many software engineering tasks, like program understanding, maintenance, debugging, testing, code reuse, etc. This paper introduces the first forward slicing technique for multi-paradigm declarative programs. In particular, we show how program slicing can be defined in terms of online p...

متن کامل

Pre/Post Conditioned Slicing

This paper shows how analysis of programs in terms of preand postconditions can be improved using a generalisation of conditioned program slicing called pre/post conditioned slicing. Such conditions play an important role in program comprehension, reuse, verification and reengineering. Fully automated analysis is impossible because of the inherent undecidability of preand postconditions. The me...

متن کامل

Forward slicing of functional logic programs by partial evaluation

Program slicing has been mainly studied in the context of imperative languages, where it has been applied to a wide variety of software engineering tasks, like program understanding, maintenance, debugging, testing, code reuse, etc. This work introduces the first forward slicing technique for declarative multi-paradigm programs which integrate features from functional and logic programming. Bas...

متن کامل

Using Prior Knowledge: Problems and Solutions

Encoding knowledge is time consuming and expensive. A possible solution to reduce the cost of developing a new knowledge base (KB) is to reuse existing knowledge. Previous work addressing this problem has focused on standards for representing, exchanging, and accessing knowledge (Genesereth and Fikes 1992), (Chaudhri et al. 1998), and on creating large repositories of knowledge (Lenat and Guha ...

متن کامل

Program Comprehension Assisted by Slicing and Transformation

Program slicing is a technique for program simpli cation based upon the deletion of statements which cannot a ect the values of a chosen set of variables. Because slicing extracts a subcomponent of the program concerned with some speci c computation on a set of variables, it can be used to assist program comprehension, allowing a programmer to remodularise a program according to arbitrarily sel...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007